import java.io.Serializable;

// 实现Serializable接口以支持序列化
public class Person implements Serializable {
    // 显式定义序列化版本号，确保序列化/反序列化兼容性
    private static final long serialVersionUID = 1L;

    private String name;      // 姓名
    private int age;          // 年龄
    private double height;    // 身高
    private double weight;    // 体重
    private String sex;       // 性别
    private String number;    // 电话号码

    // 修正构造方法，匹配所有成员变量
    public Person(String name, int age, double height, double weight, String sex, String number) {
        this.name = name;
        this.age = age;
        this.height = height;
        this.weight = weight;
        this.sex = sex;
        this.number = number;
    }

    // Getter和Setter方法（删除重复方法，补充所有成员变量的访问方法）
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                ", weight=" + weight +
                ", sex='" + sex + '\'' +
                ", number='" + number + '\'' +
                '}';
    }
}